import java.util.Scanner;

public class Game {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int tmp = 1;
        while(n <= k) {
            if(n <= 2 * k) {
                n =  n - (n - k - 1);
            } else {
                n = n - k;
            }
            tmp++;
        }
        if(tmp % 2 == 0) {
            System.out.println("B");
        } else {
            System.out.println("A");
        }
    }
}
